<?php
/* @var $this AdsController */
/* @var $model Ads */
/* @var $form CActiveForm */
?>
<?php
$form = $this->beginWidget('CActiveForm', array(
    'id' => 'ads-form',
    'enableAjaxValidation' => false,
        ));
?>
<div class="box">
    <div class="heading">
        <h1><img src="image/book.png" alt="" />Insert Ads</h1>
        <div class="buttons">
<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save', array('id' => 'yt0')); ?>
<?php echo CHtml::link('Cancel', array('ads/index'), array('class' => 'button')) ?>
        </div>
    </div>
    <div class="content">
        <div id="tab-data">
            <table class="form">
                <p class="note">Fields with <span class="required">*</span> are required.</p>

<?php echo $form->errorSummary($model); ?>

                <tr>
                    <td><?php echo $form->labelEx($model, 'ads_title'); ?></td>
                    <td><?php echo $form->textField($model, 'ads_title', array('size' => 50, 'maxlength' => 50)); ?></td>
                </tr>
                <tr>
                    <td><?php echo $form->labelEx($model, 'ads_desc'); ?></td>
                    <td><?php echo $form->textArea($model, 'ads_desc', array('rows' => 6, 'cols' => 50)); ?></td>
                </tr>

                <tr>
                    <td><?php echo $form->labelEx($model, 'ads_url'); ?></td>
                    <td><?php echo $form->textField($model, 'ads_url', array('size' => 60, 'maxlength' => 360)); ?></td>
                </tr>

                <tr>
                    <td><?php echo $form->labelEx($model, 'ads_begindate'); ?></td>
                    <td>
                        <?php
                        Yii::import('application.extensions.CJuiDateTimePicker');
                        $this->widget('CJuiDateTimePicker', array(
                            'name' => 'Ads[ads_begindate]',
                            'model' => $model,
                            'language' => '',
                            'attribute' => 'ads_begindate',
                            'value' => date('dd-mm-yy H:i:s', CDateTimeParser::parse($model->ads_begindate,'dd-mm-yyyy hh:mm')),
                            // additional javascript options for the date picker plugin
                            'options' => array(
                                'showAnim' => 'fold',
                                'dateFormat' => 'dd-mm-yy',
                                'timeFormat' =>  'hh:mm',
                            ),
                            'htmlOptions' => array(
                                'style' => 'height:20px;',
                            ),
                        ));
                        ?>
                    </td>
                </tr>

                <tr>
                    <td><?php echo $form->labelEx($model, 'ads_duration'); ?></td>
                    <td><?php echo $form->textField($model, 'ads_duration'); ?></td>
                </tr>

                <tr>
                    <td><?php echo $form->labelEx($model, 'ads_website'); ?></td>
                    <td><?php echo $form->textField($model, 'ads_website', array('size' => 60, 'maxlength' => 120)); ?></td>
                </tr>

                <tr>
                    <td><?php echo $form->labelEx($model, 'ads_customer_name'); ?></td>
                    <td><?php echo $form->textField($model, 'ads_customer_name', array('size' => 40, 'maxlength' => 40)); ?></td>
                </tr>

                <tr>
                    <td><?php echo $form->labelEx($model, 'ads_phone'); ?></td>
                    <td><?php echo $form->textField($model, 'ads_phone', array('size' => 40, 'maxlength' => 40)); ?></td>
                </tr>

                <tr>
                    <td><?php echo $form->labelEx($model, 'ads_order'); ?></td>
                    <td><?php echo $form->textField($model, 'ads_order'); ?></td>
                </tr>

                <tr>
                    <td><?php echo $form->labelEx($model, 'ads_image'); ?></td>
                    <td><?php echo $form->textField($model, 'ads_image', array('size' => 60, 'maxlength' => 120)); ?></td>
                </tr>
            </table>
        </div>
    </div>
</div>
<?php $this->endWidget(); ?>